#pragma once
#include "..\Utilities\Utilities.h"
typedef void (*Function) ();

class Button
{
public:
	Button(void);
	~Button(void);

	void Render ();
	void Update (float deltaTime);

	void Init (char* image, float posX, float posY, float width, float height);
	void SetOnClickListener (Function onClick) { m_onClick = onClick; }

	bool OnTouchDown (float xPos, float yPos);
	bool OnTouchUp (float xPos, float yPos);
private:
	Vector2 m_position;
	Vector2 m_size;
	Vector3 m_pressedColor;
	Matrix  m_matrix;

	bool m_bIsPressed;
	Function m_onClick;

	GLuint m_textureId;
};
